]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
keyboard: switch to using the correct gsettings key for enable/disable
authorDan Winship <danw@gnome.org>
Mon, 29 Aug 2011 17:02:42 +0000 (13:02 -0400)
committerDan Winship <danw@gnome.org>
Mon, 19 Sep 2011 11:34:02 +0000 (07:34 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=612662

data/org.gnome.shell.gschema.xml.in
js/ui/keyboard.js
js/ui/status/accessibility.js

index 646b1901ab2e7f16d50cfb777ee4116d91e6848d..55db42a89daac867cd36376a8a1bad174572771d 100644 (file)
 
   <schema id="org.gnome.shell.keyboard" path="/org/gnome/shell/keyboard/"
           gettext-domain="@GETTEXT_PACKAGE@">
-    <key name="show-keyboard" type="b">
-      <default>false</default>
-      <_summary>Show the onscreen keyboard</_summary>
-      <_description>
-        If true, display onscreen keyboard.
-      </_description>
-    </key>
     <key name="keyboard-type" type="s">
       <default>'touch'</default>
       <_summary>Which keyboard to use</_summary>
index 46a45b55b1adc511b618b688471232462dd9dd87..9cfb90232be4bc983789fb41912cc733b478b9a7 100644 (file)
@@ -15,9 +15,11 @@ const Main = imports.ui.main;
 const MessageTray = imports.ui.messageTray;
 
 const KEYBOARD_SCHEMA = 'org.gnome.shell.keyboard';
-const SHOW_KEYBOARD = 'show-keyboard';
 const KEYBOARD_TYPE = 'keyboard-type';
 
+const A11Y_APPLICATIONS_SCHEMA = 'org.gnome.desktop.a11y.applications';
+const SHOW_KEYBOARD = 'screen-keyboard-enabled';
+
 // Key constants taken from Antler
 // FIXME: ought to be moved into libcaribou
 const PRETTY_KEYS = {
@@ -207,6 +209,8 @@ Keyboard.prototype = {
 
         this._keyboardSettings = new Gio.Settings({ schema: KEYBOARD_SCHEMA });
         this._keyboardSettings.connect('changed', Lang.bind(this, this._settingsChanged));
+        this._a11yApplicationsSettings = new Gio.Settings({ schema: A11Y_APPLICATIONS_SCHEMA });
+        this._a11yApplicationsSettings.connect('changed', Lang.bind(this, this._settingsChanged));
         this._settingsChanged();
     },
 
@@ -215,7 +219,7 @@ Keyboard.prototype = {
     },
 
     _settingsChanged: function () {
-        this._enableKeyboard = this._keyboardSettings.get_boolean(SHOW_KEYBOARD);
+        this._enableKeyboard = this._a11yApplicationsSettings.get_boolean(SHOW_KEYBOARD);
         if (!this._enableKeyboard && !this._keyboard)
             return;
         if (this._enableKeyboard && this._keyboard &&
index dac4ef047cd1c897ee30c9aa71d6451b6da762ab..4ded5a32663150a7ab81c709f332f5d10f154997 100644 (file)
@@ -68,9 +68,9 @@ ATIndicator.prototype = {
 //                                                               'screen-reader-enabled');
 //        this.menu.addMenuItem(screenReader);
 
-//        let screenKeyboard = this._buildItem(_("Screen Keyboard"), APPLICATIONS_SCHEMA,
-//                                                                   'screen-keyboard-enabled');
-//        this.menu.addMenuItem(screenKeyboard);
+        let screenKeyboard = this._buildItem(_("Screen Keyboard"), APPLICATIONS_SCHEMA,
+                                                                   'screen-keyboard-enabled');
+        this.menu.addMenuItem(screenKeyboard);
 
         let visualBell = this._buildItemGConf(_("Visual Alerts"), client, KEY_VISUAL_BELL);
         this.menu.addMenuItem(visualBell);